<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">

<title> 提交记录 7000 - Judge Duck Online </title>

<link rel="icon" type="image/png" href="/images/judgeduck-logo-small.png" />

<script src="/libs/js/jquery-3.2.1.min.js"></script>

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="/libs/css/bootstrap.min.css" />

<!-- Latest compiled and minified JavaScript -->
<script src="/libs/js/bootstrap.min.js"></script>

<link rel="stylesheet" type="text/css" href="/css/main.css" />
<link rel="stylesheet" href="/css/non-responsive.css" type="text/css" />

<script src="/js/md5.js"></script>
<script src="/js/judgeduck.js"></script>

<script type="text/x-mathjax-config">
	MathJax.Hub.Config({
		showProcessingMessages: false,
		tex2jax: {
			inlineMath: [["$", "$"], ["\\\\(", "\\\\)"]],
			processEscapes:true
		},
		menuSettings: {
			zoom: "Hover"
		}
	});
</script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@2.7.1/MathJax.js?config=TeX-AMS_HTML"></script>

<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
<script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>

</head>

<body onload="">

<!-- Fixed navbar -->
<nav class="navbar navbar-default" role="navigation" style="background-color: #eeeeee">
	<div class="container">
		<div class="navbar-header">
			<div class="navbar-brand">
				<a href="/">
					<img src="/images/judgeduck-logo.png" width="40px" height="40px" style="margin:-10px" />
				</a>
			</div>
			<font class="navbar-brand">
				Judge Duck Online
			</font>
		</div>
		<div class="navbar-collapse collapse">
			<ul class="nav navbar-nav">
				<li class="nav-item">
					<a class="nav-link" href="/index/index.html"> 首页 </a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/problems/index.html"> 题目列表 </a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/index/index.html"> 首页 </a>
<a style="display:inline-block;background-color:;color:#fff;padding:2px 5px;font-family:arial;font-size:12px;font-weight:bold;" href="http://www.iis7.com" target="_blank" class="eab5ebf7b8d24f1d91ad1fa72e9a9fe4">iis7站长之家</a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/blogs/index.html"> 博客 </a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/faq/index.html"> FAQ </a>
				</li>
			</ul>
			<ul class="nav navbar-nav navbar-right">
				<li class="nav-item">
					<a class="nav-link" href="/user/login/index.html"> 登录 </a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/user/register/index.html"> 注册 </a>
				</li>
			</ul>
		</div><!--/.nav-collapse -->
	</div>
</nav>




<div id="main_div" class="container" style="padding-left: 25px; padding-right: 25px">
	<h2> 提交记录 7000 </h2>
	<hr />
	
	<div class="row">
		<div class="col-xs-12">
			<table class="table table-bordered">
				<tr>
					<th class="col-xs-2"> 用户 </th>
					<th class="col-xs-3"> 题目 </th>
					<th class="col-xs-2"> 状态 </th>
					<th class="col-xs-1"> 得分 </th>
					<th class="col-xs-1"> 用时 </th>
					<th class="col-xs-1"> 内存 </th>
					<th class="col-xs-1"> 语言 </th>
					<th class="col-xs-1"> 代码长度 </th>
				</tr>
				<tr>
					<td style='font-size:13px'> <a href='/user/profile/negiizhao/index.html'> negiizhao </a> </td>
<td> <a href='/problem/1002/index.html'> 1002. 测测你的多项式乘法 </a> </td>
<td> Accepted </td>
<td> 100 </td>
<td style='font-size:13px'> 409.149 ms </td>
<td style='font-size:13px'> 143 MB + 680 KB </td>
<td style='font-size:13px'> C++11 </td>
<td style='font-size:13px'> 2.78 KB </td>
				</tr>
			</table>
			<table class="table table-bordered">
				<tr>
					<th class="col-xs-6"> 提交时间 </th>
					<th class="col-xs-6"> 评测时间 </th>
				</tr>
				<tr>
					<td style='font-size:13px'> 2018-12-07 09:46:43 </td>
<td style='font-size:13px'> 2019-01-19 16:19:03 </td>
				</tr>
			</table>
			<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.12.0/build/styles/tomorrow.min.css">
			<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.12.0/build/highlight.min.js"></script>
			<script>hljs.initHighlightingOnLoad();</script>
			<div class="row">
				<label for="code"> 代码 </label>
				<pre style="background-color:white"><code class="cpp">#include &lt;cstdio&gt;
#include &lt;cctype&gt;
#include &lt;cmath&gt;
#include &lt;algorithm&gt;

constexpr double Pi = 3.1415926535897932384626433832795;
constexpr int Max_size = 1 &lt;&lt; 21 | 5;

struct Complex { double R, I; };

inline Complex operator+(const Complex &amp;C1, const Complex &amp;C2) { return Complex{C1.R + C2.R, C1.I + C2.I}; }
inline Complex operator-(const Complex &amp;C1, const Complex &amp;C2) { return Complex{C1.R - C2.R, C1.I - C2.I}; }
inline Complex operator*(const Complex &amp;C1, const Complex &amp;C2) { return Complex{C1.R * C2.R - C1.I * C2.I, C1.R * C2.I + C1.I * C2.R}; }
inline Complex operator~(const Complex &amp;C) { return Complex{C.R, -C.I}; }
inline Complex &amp;operator*=(Complex &amp;C1, const Complex &amp;C2) { return C1 = C1 * C2; }

int size;
int bitrev[Max_size];
Complex w[Max_size];

inline void init(int n)
{
	for (size = 1; size &lt; n; size &lt;&lt;= 1)
		;
	for (int i = 0; i != size; ++i)
		bitrev[i] = bitrev[i &gt;&gt; 1] &gt;&gt; 1 | ((i &amp; 1) * (size &gt;&gt; 1));
	size &gt;&gt;= 1;
	Complex pr = {cos(Pi / size), sin(Pi / size)};
	w[size] = {1, 0};
	for (int i = 1; i != size; ++i)
		w[size + i] = w[size + i - 1] * pr;
	for (int i = size - 1; i; --i)
		w[i] = w[i &lt;&lt; 1];
	size &lt;&lt;= 1;
}

inline void DFT(Complex A[], int L)
{
	int shift = __builtin_ctz(size) - __builtin_ctz(L);
	for (int i = 0; i != L; ++i)
		if (i &lt; bitrev[i] &gt;&gt; shift)
			std::swap(A[i], A[bitrev[i] &gt;&gt; shift]);
	for (int d = 1; d != L; d &lt;&lt;= 1)
		for (int i = 0; i != L; i += d &lt;&lt; 1)
			for (int j = 0; j != d; ++j)
			{
				Complex tmp = A[i + d + j] * w[d + j];
				A[i + d + j] = A[i + j] - tmp, A[i + j] = A[i + j] + tmp;
			}
}

inline void Real_DFT(Complex A[], int L)
{
	if (L == 1)
		return;
	static Complex tmp[Max_size];
	L &gt;&gt;= 1;
	for (int i = 0; i != L; ++i)
		tmp[i] = {A[i &lt;&lt; 1].R, A[i &lt;&lt; 1 | 1].R};
	DFT(tmp, L);
	tmp[L] = tmp[0];
	for (int i = 0; i != L; ++i)
	{
		Complex t1 = (tmp[i] + ~tmp[L - i]) * Complex{0.5, 0}, t2 = (tmp[i] - ~tmp[L - i]) * Complex{0, -0.5} * w[L + i];
		A[i] = t1 + t2, A[L + i] = t1 - t2;
	}
}

inline void Real_IDFT(Complex A[], int L)
{
	if (L == 1)
		return;
	static Complex tmp[Max_size];
	A[L] = A[0];
	std::reverse(A + 1, A + L);
	L &gt;&gt;= 1;
	for (int i = 0; i != L; ++i)
	{
		Complex t1 = (A[i] + A[L + i]) * Complex{0.5, 0}, t2 = (A[i] - A[L + i]) * Complex{0, 0.5} * w[L + i];
		tmp[i] = t1 + t2;
	}
	DFT(tmp, L);
	for (int i = 0; i != L; ++i)
		A[i &lt;&lt; 1] = {tmp[i].R / L, 0}, A[i &lt;&lt; 1 | 1] = {tmp[i].I / L, 0};
}

int N, M, L;
Complex A[Max_size], B[Max_size];

void poly_multiply(unsigned *a, int n, unsigned *b, int m, unsigned *c)
{
	N = n, M = m;
	for (int i = 0; i &lt;= N; ++i)
		A[i].R = a[i];
	for (int i = 0; i &lt;= M; ++i)
		B[i].R = b[i];
	
	for (L = 2; L &lt;= N + M; L &lt;&lt;= 1)
		;
	init(L);
	
	Real_DFT(A, L), Real_DFT(B, L);
	for (int i = 0; i != L; ++i)
		A[i] *= B[i];
	Real_IDFT(A, L);
	
	for (int i = 0; i &lt;= N + M; ++i)
		c[i] = A[i].R + 0.5;
}</code></pre>
				<br />
				
				<label for="result"> 评测结果 </label><div class="row"><div class="col-xs-12"><div class="alert alert-success"><div class="text-center row"><table class="table table-borderless" style="margin:0px"><tr><td class="col-xs-2" style="vertical-align:middle;padding-left:20px;padding-right:20px"><b>Compilation</b></td><td class="col-xs-2" style="vertical-align:middle">N/A</td><td class="col-xs-2" style="vertical-align:middle">N/A</td><td class="col-xs-2" style="vertical-align:middle">Compile OK</td><td class="col-xs-2" style="vertical-align:middle">Score: N/A</td><td class="col-xs-2" style="vertical-align:middle"><a data-toggle="collapse" href="#detail_1" aria-expanded="false" aria-controls="detail_1">显示更多</a></td></tr></table></div><div class="collapse" id="detail_1"><br /><textarea class="form-control" style="background-color: white" rows="8" readonly>Compiling...
Compile success!
</textarea></div></div><div class="alert alert-success"><div class="text-center row"><table class="table table-borderless" style="margin:0px"><tr><td class="col-xs-2" style="vertical-align:middle;padding-left:20px;padding-right:20px"><b>Testcase #1</b></td><td class="col-xs-2" style="vertical-align:middle">409.149 ms</td><td class="col-xs-2" style="vertical-align:middle">143 MB + 680 KB</td><td class="col-xs-2" style="vertical-align:middle">Accepted</td><td class="col-xs-2" style="vertical-align:middle">Score: 100</td><td class="col-xs-2" style="vertical-align:middle"><a data-toggle="collapse" href="#detail_2" aria-expanded="false" aria-controls="detail_2">显示更多</a></td></tr></table></div><div class="collapse" id="detail_2"><br /><textarea class="form-control" style="background-color: white" rows="8" readonly>verdict = Run Finished
time_ms = 409.148610
mem_kb = 147112
Correct Answer
</textarea></div></div></div></div>
			</div>
		</div>
	</div>

	<hr />
	
	<div class="row">
		<p style="text-align: center; color: #888">
			Judge Duck Online | 评测鸭在线 <br />
			Server Time: 2019-08-02 17:12:26 | Loaded in 2 ms | <a href="/status/index.html"> Server Status </a> <br />
			个人娱乐项目，仅供学习交流使用
		</p>
	</div>
</div>

</body>

</html>
